Documentation

imonit_client
in package

Table of Contents

Constants

version  = '00.02.008 19.09.2026'
This constant is holding the current version and the date of the last change.

Properties

$customernumber  : int
This is representing the customer number the token belongs to.
$hash  : string
This string holds the hash value used for identification and verification of the token at the central i-mon-it Service.
$isvalid  : bool
This is the indicator holding information whether the token found and loaded is valid or not.
$nextupdate  : DateTime
This is the date: when when the token file requires an update from the i-mon-itserver
$token  : string
This is the name of the local tokenfile to be placed in the root directory of your web application. it must have the name "imonit.token", which shall not be hange.
$tokenfilename  : string
Name of the token file loaded into the class.
$tokenid  : int
Holds is a unique identifier of the token within the i-mon-it ecosystem.
$tokenversion  : string
Version of the token which was loaded into the current instance of the class.
$useragent  : string
String of the user agent from the browser as it is recorded by the Web server.
$websidename  : string
Name of the website associated with the token
$websiteid  : int
This is the id of the wbsite, which is monitored by the service.

Methods

__construct()  : mixed
This is a constructor used to instanciate the class.
__destruct()  : mixed
This destructor method is cleaning up the memory consumed by the instance of the imonit_clirent instance.
count()  : bool
This method is calling the micro service "count" on the i-mon-it Server. This is allowing to keep up with the numbers of lines of code that a class or file does have in your application. This number of lines isn't only an important indicator for the overall complexity of your current that application but also does give good indications, whether you would need consider increasing your effort for maintainance your application such to be put into your refectoring or retiring rarely used functionality.
end()  : int
This static function as a recording the endpoint of the method you are tracking by the i-mon-it service.
endPage()  : int
This static method is used to properly track the endpoint of your webpage and instruct the i-mon-it service to insert and page record into the data mart.
file()  : string
This static method returns the filename npath of the libray as where it is stored in the web project.
getcustomernumber()  : int
This method return the i-mon-it customer mumber the token belongs to as stored in the Token.
gettokenid()  : int
This method is returning the token ID of your website provided by i-mon-it
gettokeninfo()  : string
Returns an HTML table with information of the various attributes and their values of the token loaded into the class.
gettokenname()  : string
This method simply returns the name of the token of that website loaded from the tokenfile as it has to be stored on the website.
gettokenversion()  : string
Returns the token API version, which is token is created by.
getwebsiteid()  : int
This method returns the number of the Website from the token.
isvalid()  : bool
This method is returning a bullion flak whether or not the client instance and the corresponding token are valid.
lastentry()  : int
This static method retrieves the last entry within the database regarding the current webapplication.
mid()  : int
This method should be used in case your function is performing heavy-duty operations and he want to have more than just a start and end point of your method being captured and tracked by the i-mon-it service.
midPage()  : int
This static method is used to properly track a midpoint of your webpage and instruct the i-mon-it service to insert and page record into the data mart.
ping()  : bool
This static method allows for i-mon-it to capture information from the web applications powered by i-mon-it.
start()  : int
This static method is used the record the start of the execution of the method in your application.
startPage()  : int
This is one of the main methods provided by the library it is the start call to monitor a Webpage using i-mon-it Micro Services to record the start of a page.
ua()  : int
This micro service is retrieving the identifier number for the browser also known as user agent.
updatetoken()  : bool
With this method the tokenfile will be updated by the newest version of the token file coming from the central i-mon-it services. It requires a valid account, otherwise there will be no new file returned from the server.
verifytoken()  : bool
This method checks back to the i-mon-it server, whether the token has changed
version()  : string
This method is returning the version number of the client library including the date of last change

Constants

version

This constant is holding the current version and the date of the last change.

public string version = '00.02.008 19.09.2026'

version and date of change Format:nn.nn.nnn dd.mm.yyyy

Properties

$customernumber

This is representing the customer number the token belongs to.

private int $customernumber = -1

The method only reads the inforation from the token file in the root directory of your web application

custom number of the token owner

Tags
see
imonit_client::getcustomernumber()

$hash

This string holds the hash value used for identification and verification of the token at the central i-mon-it Service.

private string $hash = ''

Hash value for the Token

Tags
see
imonit_client::verifytoken()

$isvalid

This is the indicator holding information whether the token found and loaded is valid or not.

private bool $isvalid = \false
Tags
see
imonit_client::isvalid()

$token

This is the name of the local tokenfile to be placed in the root directory of your web application. it must have the name "imonit.token", which shall not be hange.

private string $token = 'imonit.token'

Even the tokenfile is a simple textfile it may not be altered as any edit can cause the service to stop working properly. At any time you cann get an uptodate token file for your web application calling www.i-mon-it.de and login in. There is function letting you downlod the token file immeadiately.

name of the token found for this web application.

Tags
see
imonit_client::gettokenname()
see
imonit_client::itokenfilename

$tokenfilename

Name of the token file loaded into the class.

private string $tokenfilename = ''

Name of the token file loaded into the class.

Tags
see
imonit_client::updatetoken

()

$tokenversion

Version of the token which was loaded into the current instance of the class.

private string $tokenversion = ''

version of the token declaration loaded into the instance of the class.

Tags
see
imonit_client::gettokenversion()

$useragent

String of the user agent from the browser as it is recorded by the Web server.

private string $useragent = ''

User agent string as provided by the browser and the Web server.

$websidename

Name of the website associated with the token

private string $websidename = ''

website associated with the token.

$websiteid

This is the id of the wbsite, which is monitored by the service.

private int $websiteid = -1

This number refers to the i-mon-it database. It is set by the token.

Number of the website as named in the i-mon-it central service.

Tags
see
imonit_client::getwebsiteid()

Methods

__construct()

This is a constructor used to instanciate the class.

public __construct() : mixed

This constructor does not require any parameters to function. The constructor retrieves the necessary information regarding the webapplication from the token file which has to reside in the root directory of your web application and has to be named 'imonit.token'.

__destruct()

This destructor method is cleaning up the memory consumed by the instance of the imonit_clirent instance.

public __destruct() : mixed

Even some of the library is programmed to only use very little memory resources it is a good practice to unset the client instance at the end of your webpage or your class using the imonit micro services.

count()

This method is calling the micro service "count" on the i-mon-it Server. This is allowing to keep up with the numbers of lines of code that a class or file does have in your application. This number of lines isn't only an important indicator for the overall complexity of your current that application but also does give good indications, whether you would need consider increasing your effort for maintainance your application such to be put into your refectoring or retiring rarely used functionality.

public static count(int $token, bool $istdatei, string $fileorclass, int $lines, string $version) : bool
Parameters
$token : int

This is the token of your website.

$istdatei : bool

This flag is indicating whether the calling file or class is actually a file ( value: true) or class( value: false).

$fileorclass : string

This is the filename including the pathname or just the class name

$lines : int

this is the numbers of lines of your file or class at this given point.

$version : string

This is the dated working number of your last change of the code you are monitoring.

Return values
bool —

The method returns an indicator of success or failure of the execution.

end()

This static function as a recording the endpoint of the method you are tracking by the i-mon-it service.

public static end(int $token, int $startid, string $fileorMethod, int $line, bool $paid, string $aktion, string $version) : int
Parameters
$token : int

This is the number of your token of your website

$startid : int

this is the i-mon-it service ID, which you got when you called the start service.

$fileorMethod : string

This is the name of the class and method you're calling the i-mon-it service from. In the case of the end Service this is typically__MEWTHOD__.

$line : int

This is line of code within your source code you according the end service from. The value used here is typically the PHP constant LINE.

$paid : bool

This flag is indicating whether or not you consider this method in this tracking point part of the payload of your website.

$aktion : string
$version : string
Tags
see
imonit_client::Start()
see
imonit_client::mid()
Return values
int —

Returns of the unique i-mon-it service ID provided by the central i-mon-it service.

endPage()

This static method is used to properly track the endpoint of your webpage and instruct the i-mon-it service to insert and page record into the data mart.

public static endPage(int $token, int $startid, string $fileorMethod, int $line, bool $paid, string $aktion, string $version) : int
Parameters
$token : int

This is the ID of the token, which is used to identify the website with the i-mon-it service.

$startid : int

This is the ID provided by the i-mon-it service start page at the time you called the start page method from this library.

$fileorMethod : string

Name of the file holding the webpage. The value is typically provided by the PHP constant FILE.

$line : int

this is a line inside the source code from where you calling the end page action. as value you typically provides a PHP constant LINE.

$paid : bool

Flag indicating whether you considering this page being part of the payload of your website.

$aktion : string

This is the action that webpage has performed.

$version : string
Return values
int —

Returns the endid for the microservice call

file()

This static method returns the filename npath of the libray as where it is stored in the web project.

public static file() : string

The purpose for this method is mainly debugging and quality management for your website.

Return values
string

getcustomernumber()

This method return the i-mon-it customer mumber the token belongs to as stored in the Token.

public getcustomernumber() : int
Return values
int —

number of the customer;

gettokenid()

This method is returning the token ID of your website provided by i-mon-it

public gettokenid() : int
Return values
int —

ID of the token provided by i-mon-it

gettokeninfo()

Returns an HTML table with information of the various attributes and their values of the token loaded into the class.

public gettokeninfo() : string
Return values
string —

an HTML table containing information about the token used by this website

gettokenname()

This method simply returns the name of the token of that website loaded from the tokenfile as it has to be stored on the website.

public gettokenname() : string
Tags
see
imonit_client::token
Return values
string —

Name of the token used by this client website.

gettokenversion()

Returns the token API version, which is token is created by.

public gettokenversion() : string
Tags
see
imonit_client::tokenversion
Return values
string —

Version the token API

getwebsiteid()

This method returns the number of the Website from the token.

public getwebsiteid() : int

return int: Websiteid as stored in the token.

Return values
int

isvalid()

This method is returning a bullion flak whether or not the client instance and the corresponding token are valid.

public isvalid() : bool
Return values
bool —

Returns true in case the client instance is valid, false will be returned otherwise.

lastentry()

This static method retrieves the last entry within the database regarding the current webapplication.

public static lastentry(string $fileorMethod, string $aktion) : int

Should not required anymore as of Jannuary15th, 2026

Parameters
$fileorMethod : string

Mane of the calling Method or file.

$aktion : string

Name of the action that should be associated with this call.

Return values
int —

Returns the number of the last entry in the i-mon-it database

mid()

This method should be used in case your function is performing heavy-duty operations and he want to have more than just a start and end point of your method being captured and tracked by the i-mon-it service.

public static mid(int $token, int $startid, string $methodorfile, int $line, bool $paid, string $aktion, string $version) : int
Parameters
$token : int

This is a number of the token of your website.

$startid : int

This is the ID you did get when you call it the start i-mon-it service. Bypassing this on to the mixed tracking request and later to the end i-mon-it service. You can ensure that the i-mon-it service will correctly track your function flow over the overall course of the method execution

$methodorfile : string

Here you should use the PHP constant__METHOD__ in order to capture the proper quotation of your class and the method for which you call this function.

$line : int

This is the line of code of the method call. Typically that PHP constant LINE is used to document this.

$paid : bool

Indicator whether you consider this method and part of your payload of your application.

$aktion : string

This is a possibility to further differenciate the context in which this is called.

$version : string
Tags
see
imonit_client::start()
see
imonit_client::end()
Return values
int —

The method returns a unique ID from the i-mon-it tracking service.

midPage()

This static method is used to properly track a midpoint of your webpage and instruct the i-mon-it service to insert and page record into the data mart.

public static midPage(int $token, int $startid, string $fileorMethod, int $line, bool $paid, string $aktion, string $version) : int
Parameters
$token : int

This is the ID of the token, which is used to identify the website with the i-mon-it service.

$startid : int

This is the ID provided by the i-mon-it service start page at the time you called the start page method from this library.

$fileorMethod : string

Name of the file holding the webpage. The value is typically provided by the PHP constant FILE.

$line : int

this is a line inside the source code from where you calling the end page action. as value you typically provides a PHP constant LINE.

$paid : bool

Flag indicating whether you considering this page being part of the payload of your website.

$aktion : string

This is the action that webpage has performed.

$version : string
Return values
int

ping()

This static method allows for i-mon-it to capture information from the web applications powered by i-mon-it.

public static ping(int $token, string $service, bool $paid, int $lines, int $duration, string $version) : bool

This method shall not be called without consulting i-mon-it Support. It is mainly used internally.

Parameters
$token : int

This is the token from the calling website as profided by i-mon-it

$service : string

This is the name of the service inside the i-mon-it ecosystem

$paid : bool

Is this ping cal considred a paid ping

$lines : int

Number of lines that should be recorded

$duration : int
$version : string
Return values
bool

start()

This static method is used the record the start of the execution of the method in your application.

public static start(int $token, string $fileorMethod, int $line, bool $paid, string $aktion, string $version) : int
Parameters
$token : int

This is the number of the token of your website.

$fileorMethod : string

This is the source file which you want a morning tour using the star service. Typically as the stock service is Used inside the core application you can use the PHP constant__METHOD__, which way you capture the complete identifier of your class.

$line : int

This is the line of your source code, which is used to call the i-mon-it service. Typically you can use therefore the PHP constant LINE.

$paid : bool
$aktion : string

This is an option to specify even more the curent Action item an to diffferentuate the use of the function.

$version : string
Tags
see
imonit_client::end

()

Return values
int —

The method returns the unique ID by which the tracking request is captured within thei-mon-it service.

startPage()

This is one of the main methods provided by the library it is the start call to monitor a Webpage using i-mon-it Micro Services to record the start of a page.

public static startPage(int $token, string $fileorMethod, int $line, bool $paid, string $aktion, string $version) : int

This is a static function, which shall be used directly within your website. It correspomding cal i that of endpage

Parameters
$token : int

Number of your token.

$fileorMethod : string
$line : int

This is a reference to the line number within the source code from where the recording for the page should be started. This is typically you done by using the PHP constant__LINE__

$paid : bool

this boolean value is indicating, whether you consider the calling webpage part of your payload. This value is impacting the reporting and the analysis of the i-mon-it offering.

$aktion : string

Often and PHP projects one single webpage is implementing many typical functions, Iin order to properly track the different functions this parameter can be used.

$version : string
Tags
see
imonit_client::endpge()
Return values
int —

The call to the i-mon-it server will generate an unique ID, which should be stored and be provided as one of the parameters, when you call the metric and page method from the imonit_client library.

ua()

This micro service is retrieving the identifier number for the browser also known as user agent.

public static ua(string $ua) : int

The method asks for the string to pass the user agent identifier to the method. This is an optional parameter as a method itself is using a standard function to retrieve the user agent directly. The method returns the number of the user agent as it is returned from the i-mon-it micro service.

Parameters
$ua : string

This optional parameter should contain the three-ring which identifies the browser also known as useragent.

Tags
see
getuseragent()
Return values
int —

Key of the useragent as it is known in the i-mon-it ecosystem.

updatetoken()

With this method the tokenfile will be updated by the newest version of the token file coming from the central i-mon-it services. It requires a valid account, otherwise there will be no new file returned from the server.

public static updatetoken(int $token, string $fileorMethod, int $line, int $app, bool $paid, string $aktion, string $version) : bool
Parameters
$token : int
$fileorMethod : string
$line : int
$app : int
$paid : bool
$aktion : string
$version : string
Return values
bool —

Returns whether the update was successful (true) or not (false)

verifytoken()

This method checks back to the i-mon-it server, whether the token has changed

public verifytoken(string $token, string $hash) : bool
Parameters
$token : string

Name of thetoken Name of the token

$hash : string

Takes the hash value as it is provided in the token file to check whether or not the token is valid or not.

Return values
bool —

Returns a Boolean value whether the token is is valid or not. It return true in case the token is valid. Otherwise it return false:

version()

This method is returning the version number of the client library including the date of last change

public static version() : string
Tags
see
imonit_client::version
Return values
string —

string holding was number and the date of last change of this library ( format: nn.nn.nn dd.mm.yyyy)


        
On this page

Search results